<?php
declare (strict_types = 1);

namespace app\controller;

use app\common\model\ArticleCate;
use think\facade\Cache;
use think\facade\Db;
use think\facade\View;
use think\Request;

class Tags extends Common
{

    public function __construct()
    {
        parent::__construct();
    }
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index()
    {


        $cid = input("get.cid");
        if($cid){
            $where["cate_id"] = $cid;
        }
        //$where["status"] =1;


        if(!isset($where)){
            $where = 1;
        }

        $list = \app\common\model\Tags::where($where)
            ->order("hits DESC,status DESC,id DESC")
            ->paginate([
                'list_rows'=>75,
                'query'=> $this->params,
            ]);
        View::assign("list",$list);
        return  view();
    }


}
